package cn.kmbeast.pojo.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 用户健康记录表
 */
@Data
public class UserHealth {
    /**
    * 用户健康记录主键
    */
    private Integer id;

    /**
    * 用户ID
    */
    private Integer userId;

    /**
    * 健康模型ID
    */
    private Integer healthModelConfigId;

    /**
    * 输入的值
    */
    private String value;

    /**
    * 记录时间
    */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    public void setCreateTime(LocalDateTime now) {
        //将now 转变为Date类型赋值给createTime
        this.createTime = now;
    }
}